package collection;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;

public class ListDemo1 {
    public static void main(String[] args) {
        //List<String> list1 = new LinkedList<>();

        //底层判断重复数据还是equals判断
        List<String> list = new ArrayList<>();
        list.add("one");
        list.add("two");
        list.add("three");
        list.add("one");
        System.out.println("list:"+list);

        String e= list.get(0);
        String old = list.set(3,"four");
        System.out.println(e);
        System.out.println(old);
        System.out.println(list);

    }
}
